package cn.yu.takeoutbackend.Notification.service;

import cn.yu.takeoutbackend.Notification.dao.NotificationRuleDao;
import cn.yu.takeoutbackend.Notification.entity.NotificationRule;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class NotificationRuleRepository  {

    @Autowired
    private NotificationRuleDao notificationRuleDao;
    public NotificationRule findByBizType(String bizType) {
        final QueryWrapper<NotificationRule> wrapper = new QueryWrapper<>();
        wrapper.eq("biz_type", bizType);
        return notificationRuleDao.selectOne(wrapper);
    }
}
